/*
 * Copyright (c) 2011 Toni Spets <toni.spets@iki.fi>
 *
 * Permission to use, copy, modify, and distribute this software for any
 * purpose with or without fee is hereby granted, provided that the above
 * copyright notice and this permission notice appear in all copies.
 *
 * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
 * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
 * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
 * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
 * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
 * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
 * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
 */

#include <wolapi.h>

#ifndef _INETUTILEVENT_H_
#define _INETUTILEVENT_H_

/* INetUtilEvent Interface */

extern const GUID IID_INetUtilEvent;

typedef struct _INetUtilEvent       INetUtilEvent;
typedef struct _INetUtilEventVtbl   INetUtilEventVtbl;

struct _INetUtilEvent
{
    INetUtilEventVtbl   *lpVtbl;
};

struct _INetUtilEventVtbl
{
    /* IUnknown */
    HRESULT(__stdcall *QueryInterface)  (INetUtilEvent *, const IID* const riid, LPVOID * ppvObj);
    ULONG(__stdcall *AddRef)            (INetUtilEvent *);
    ULONG(__stdcall *Release)           (INetUtilEvent *);

    /* INetUtilEvent */
    HRESULT(__stdcall *OnPing)          (INetUtilEvent *, HRESULT res, int time, unsigned long ip, int handle);
    HRESULT(__stdcall *OnLadderList)    (INetUtilEvent *, HRESULT res, Ladder* list, int totalCount, long timeStamp, int keyRung);
    HRESULT(__stdcall *OnGameresSent)   (INetUtilEvent *, HRESULT res);
    HRESULT(__stdcall *OnNewNick)       (INetUtilEvent *, HRESULT res, LPSTR message, LPSTR nick, LPSTR pass);
    HRESULT(__stdcall *OnAgeCheck)      (INetUtilEvent *, HRESULT res, int years, int consent);
};

#define INetUtilEvent_OnLadderList(T,a,b,c,d,e) T->lpVtbl->OnLadderList(T,a,b,c,d,e)

#endif
